Crate font

source ·
Expand description

Font toolbox.

Example

extern crate font;

use font::{Font, Segment};

let path = "SourceSerifPro-Regular.otf";
let font = Font::open(path).unwrap();
let glyph = font.draw('&').unwrap().unwrap();
for contour in glyph.iter() {
    for segment in contour.iter() {
        match segment {
            &Segment::Linear(..) => { /* … */ },
            &Segment::Quadratic(..) => { /* … */ },
            &Segment::Cubic(..) => { /* … */ },
        }
    }
}

Structs

A contour.
A file.
A font.
A glyph.
An offset.

Enums

A segment.

Traits

A collection of glyphs.

Type Definitions

An error.
A number.
A result.